//
//  JCUIGradients.m
//  JCUIGradients
//
//  Created by TR-L on 2019/11/19.
//  Copyright © 2019 Chuan. All rights reserved.
//

#import "JCUIGradients.h"

#define JCUIGradientRGB16(value) JCUIGradientRGBA16(value, 1.0)
#define JCUIGradientRGBA16(value, a) [UIColor colorWithRed:((float)((value & 0xFF0000) >> 16))/255.0 green:((float)((value & 0xFF00) >> 8))/255.0 blue:((float)(value & 0xFF))/255.0 alpha:a]

#define JCUIGradientColor(value) ((id)(JCUIGradientRGB16(value).CGColor))

CGPoint JCUIGradientGetStartPoint(JCUIGradientDirection direction, CGFloat degree) {
    switch (direction) {
        case JCUIGradientDirectionTop: return CGPointMake(0.5, 1.0);
        case JCUIGradientDirectionLeft: return CGPointMake(1.0, 0.5);
        case JCUIGradientDirectionRight: return CGPointMake(0.0, 0.5);
        case JCUIGradientDirectionBottom: return CGPointMake(0.5, 0.0);
        case JCUIGradientDirectionDegress: {
            CGFloat radian = degree * M_PI / 180;
            return CGPointMake(0.5 * (cos(radian) + 1), 0.5 * (1 - sin(radian)));
        };
        default: break;
    }
}

CGPoint JCUIGradientGetEndPoint(JCUIGradientDirection direction, CGFloat degree) {
    switch (direction) {
        case JCUIGradientDirectionTop: return CGPointMake(0.5, 0.0);
        case JCUIGradientDirectionLeft: return CGPointMake(0.0, 0.5);
        case JCUIGradientDirectionRight: return CGPointMake(1.0, 0.5);
        case JCUIGradientDirectionBottom: return CGPointMake(0.5, 1.0);
        case JCUIGradientDirectionDegress: {
            CGFloat radian = degree * M_PI / 180;
            return CGPointMake(0.5 * (cos(radian) + 1), 0.5 * (1 + sin(radian)));
        };
        default: break;
    }
}

CAGradientLayer *JCUIGradientCreateLinearGradientLayer(JCUIGradientDirection direction, CGFloat degree, NSArray *colors, NSArray *locations, CIFilter *filter) {
    CAGradientLayer *layer = [CAGradientLayer layer];
    layer.startPoint = JCUIGradientGetStartPoint(direction, degree);
    layer.endPoint = JCUIGradientGetEndPoint(direction, degree);
    layer.colors = colors;
    layer.locations = locations;
    if (filter) { layer.backgroundFilters = @[filter]; }
    return layer;
}


CAGradientLayer *JCUIGradientCreateRadialGradientLayer(CGPoint startPoint, CGPoint endPoint, NSArray *colors, NSArray *locations, CIFilter *filter) {
    CAGradientLayer *layer = [CAGradientLayer layer];
    layer.type = kCAGradientLayerRadial;
    layer.startPoint = startPoint;
    layer.endPoint = endPoint;
    layer.colors = colors;
    layer.locations = locations;
    if (filter) { layer.backgroundFilters = @[filter]; }
    return layer;
}

CALayer *JCUIGradientMake(JCUIGradient gradient) {
    switch (gradient) {
        case JCUIGradientWarmFlame:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0xff9a9e), JCUIGradientColor(0xfad0c4), JCUIGradientColor(0xfad0c4)], @[@0.0, @0.99, @1.0], nil);
        case JCUIGradientNightFade:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xa18cd1), JCUIGradientColor(0xfbc2eb)], @[@0.0, @1.0], nil);
        case JCUIGradientSpringWarmth:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfad0c4), JCUIGradientColor(0xfad0c4), JCUIGradientColor(0xffd1ff)], @[@0.0, @0.01, @1.0], nil);
        case JCUIGradientJuicyPeach:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xffecd2), JCUIGradientColor(0xfcb69f)], @[@0.0, @1.0], nil);
        case JCUIGradientYoungPassion:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xff8177), JCUIGradientColor(0xff867a), JCUIGradientColor(0xff8c7f), JCUIGradientColor(0xf99185), JCUIGradientColor(0xcf556c), JCUIGradientColor(0xb12a5b)], @[@0.0, @0.0, @0.21, @0.52, @0.78, @1.0], nil);
        case JCUIGradientLadyLips:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xff9a9e), JCUIGradientColor(0xfecfef), JCUIGradientColor(0xfecfef)], @[@0.0, @0.99, @1.0], nil);
        case JCUIGradientSunnyMorning:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xf6d365), JCUIGradientColor(0xfda085)], @[@0.0, @1.0], nil);
        case JCUIGradientRainyAshville:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfbc2eb), JCUIGradientColor(0xa6c1ee)], @[@0.0, @1.0], nil);
        case JCUIGradientFrozenDreams:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfdcbf1), JCUIGradientColor(0xfdcbf1), JCUIGradientColor(0xe6dee9)], @[@0.0, @0.01, @1.0], nil);
        case JCUIGradientWinterNeva:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xa1c4fd), JCUIGradientColor(0xc2e9fb)], @[@0.0, @1.0], nil);
        case JCUIGradientDustyGrass:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xd4fc79), JCUIGradientColor(0x96e6a1)], @[@0.0, @1.0], nil);
        case JCUIGradientTemptingAzure:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0x84fab0), JCUIGradientColor(0x8fd3f4)], @[@0.0, @1.0], nil);
        case JCUIGradientHeavyRain:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xcfd9df), JCUIGradientColor(0xe2ebf0)], @[@0.0, @1.0], nil);
        case JCUIGradientAmyCrisp:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xa6c0fe), JCUIGradientColor(0xf68084)], @[@0.0, @1.0], nil);
        case JCUIGradientMeanFruit:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xfccb90), JCUIGradientColor(0xd57eeb)], @[@0.0, @1.0], nil);
        case JCUIGradientSoftBlue:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xe0c3fc), JCUIGradientColor(0x8ec5fc)], @[@0.0, @1.0], nil);
        case JCUIGradientRipeMalinka:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xf093fb), JCUIGradientColor(0xf5576c)], @[@0.0, @1.0], nil);
        case JCUIGradientCloudyKnoxville:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0xfdfbfb), JCUIGradientColor(0xebedee)], @[@0.0, @1.0], nil);
        case JCUIGradientMalibuBeach:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x4facfe), JCUIGradientColor(0x00f2fe)], @[@0.0, @1.0], nil);
        case JCUIGradientNewLife:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x43e97b), JCUIGradientColor(0x38f9d7)], @[@0.0, @1.0], nil);
        case JCUIGradientTrueSunset:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xfa709a), JCUIGradientColor(0xfee140)], @[@0.0, @1.0], nil);
        case JCUIGradientMorpheusDen:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x30cfd0), JCUIGradientColor(0x330867)], @[@0.0, @1.0], nil);
        case JCUIGradientRareWind:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xa8edea), JCUIGradientColor(0xfed6e3)], @[@0.0, @1.0], nil);
        case JCUIGradientNearMoon:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x5ee7df), JCUIGradientColor(0xb490ca)], @[@0.0, @1.0], nil);
        case JCUIGradientWildApple:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xd299c2), JCUIGradientColor(0xfef9d7)], @[@0.0, @1.0], nil);
        case JCUIGradientSaintPetersburg:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 135, @[JCUIGradientColor(0xf5f7fa), JCUIGradientColor(0xc3cfe2)], @[@0.0, @1.0], nil);
        case JCUIGradientAriellesSmile:
            return JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 0.5), CGPointMake(1.5, 1.5), @[JCUIGradientColor(0x16d9e3), JCUIGradientColor(0x30c7ec), JCUIGradientColor(0x46aef7)], @[@0.0, @0.47, @1.0], nil);
        case JCUIGradientPlumPlate:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 135, @[JCUIGradientColor(0x667eea), JCUIGradientColor(0x764ba2)], @[@0.0, @1.0], nil);
        case JCUIGradientEverlastingSky:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 135, @[JCUIGradientColor(0xfdfcfb), JCUIGradientColor(0xe2d1c3)], @[@0.0, @1.0], nil);
        case JCUIGradientHappyFisher:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 120, @[JCUIGradientColor(0x89f7fe), JCUIGradientColor(0x66a6ff)], @[@0.0, @1.0], nil);
        case JCUIGradientBlessing:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfddb92), JCUIGradientColor(0xd1fdff)], @[@0.0, @1.0], nil);
        case JCUIGradientSharpeyeEagle:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x9890e3), JCUIGradientColor(0xb1f4cf)], @[@0.0, @1.0], nil);
        case JCUIGradientLadogaBottom:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xebc0fd), JCUIGradientColor(0xd9ded8)], @[@0.0, @1.0], nil);
        case JCUIGradientLemonGate:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x96fbc4), JCUIGradientColor(0xf9f586)], @[@0.0, @1.0], nil);
        case JCUIGradientItmeoBranding:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 180, @[JCUIGradientColor(0x2af598), JCUIGradientColor(0x009efd)], @[@0.0, @1.0], nil);
        case JCUIGradientZeusMiracle:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xcd9cf2), JCUIGradientColor(0xf6f3ff)], @[@0.0, @1.0], nil);
        case JCUIGradientOldHat:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xe4afcb), JCUIGradientColor(0xb8cbb8), JCUIGradientColor(0xb8cbb8), JCUIGradientColor(0xe2c58b), JCUIGradientColor(0xc2ce9c), JCUIGradientColor(0x7edbdc)], @[@0.0, @0.0, @0.0, @0.3, @0.64, @1.0], nil);
        case JCUIGradientStarWine:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xb8cbb8), JCUIGradientColor(0xb8cbb8), JCUIGradientColor(0xb465da), JCUIGradientColor(0xcf6cc9), JCUIGradientColor(0xee609c), JCUIGradientColor(0xee609c)], @[@0.0, @0.0, @0.0, @0.33, @0.66, @1.0], nil);
        case JCUIGradientDeepBlue:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x6a11cb), JCUIGradientColor(0x2575fc)], @[@0.0, @1.0], nil);
        case JCUIGradientCoupDeGrace: {
            CALayer *layer = [CALayer layer];
            layer.backgroundColor = JCUIGradientRGB16(0xDCD9D4).CGColor;
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 0.0), CGPointMake(1.5, 2.0), @[(id)JCUIGradientRGBA16(0xffffff, 0.01).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.01).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIScreenBlendMode"])];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[(id)JCUIGradientRGBA16(0xffffff, 0.05).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.05).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CISoftLightBlendMode"])];
            return layer;
        }
        case JCUIGradientHappyAcid:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x37ecba), JCUIGradientColor(0x72afd3)], @[@0.0, @1.0], nil);
        case JCUIGradientAwesomePine:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xebbba7), JCUIGradientColor(0xcfc7f8)], @[@0.0, @1.0], nil);
        case JCUIGradientNewYork:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfff1eb), JCUIGradientColor(0xace0f9)], @[@0.0, @1.0], nil);
        case JCUIGradientShyRainbow:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xeea2a2), JCUIGradientColor(0xbbc1bf), JCUIGradientColor(0x57c6e1), JCUIGradientColor(0xb49fda), JCUIGradientColor(0x7ac5d8)], @[@0.0, @0.19, @0.42, @0.79, @1.0], nil);
        case JCUIGradientLoonCrest: {
            CALayer *layer = [CALayer layer];
            layer.backgroundColor = JCUIGradientRGB16(0x989898).CGColor;
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[(id)JCUIGradientRGBA16(0xffffff, 0.15).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.15).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIMultiplyBlendMode"])];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 0.0), CGPointMake(0.5, 1.0), @[(id)JCUIGradientRGBA16(0xffffff, 0.4).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.4).CGColor], @[@0.0, @1.2], [CIFilter filterWithName:@"CIMultiplyBlendMode"])];
            return layer;
        }
        case JCUIGradientMixedHopes:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xc471f5), JCUIGradientColor(0xfa71cd)], @[@0.0, @1.0], nil);
        case JCUIGradientFlyHigh:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x48c6ef), JCUIGradientColor(0x6f86d6)], @[@0.0, @1.0], nil);
        case JCUIGradientStrongBliss:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xf78ca0), JCUIGradientColor(0xf9748f), JCUIGradientColor(0xfd868c), JCUIGradientColor(0xfe9a8b)], @[@0.0, @0.19, @0.6, @1.0], nil);
        case JCUIGradientFreshMilk:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfeada6), JCUIGradientColor(0xf5efef)], @[@0.0, @1.0], nil);
        case JCUIGradientSnowAgain:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xe6e9f0), JCUIGradientColor(0xeef1f5)], @[@0.0, @1.0], nil);
        case JCUIGradientFebruaryInk:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xaccbee), JCUIGradientColor(0xe7f0fd)], @[@0.0, @1.0], nil);
        case JCUIGradientKindSteel:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xe9defa), JCUIGradientColor(0xfbfcdb)], @[@0.0, @1.0], nil);
        case JCUIGradientSoftGrass:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xc1dfc4), JCUIGradientColor(0xdeecdd)], @[@0.0, @1.0], nil);
        case JCUIGradientGrownEarly:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x0ba360), JCUIGradientColor(0x3cba92)], @[@0.0, @1.0], nil);
        case JCUIGradientSharpBlues:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x00c6fb), JCUIGradientColor(0x005bea)], @[@0.0, @1.0], nil);
        case JCUIGradientShadyWater:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x74ebd5), JCUIGradientColor(0x9face6)], @[@0.0, @1.0], nil);
        case JCUIGradientDirtyBeauty:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x6a85b6), JCUIGradientColor(0xbac8e0)], @[@0.0, @1.0], nil);
        case JCUIGradientGreatWhale:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xa3bded), JCUIGradientColor(0x6991c7)], @[@0.0, @1.0], nil);
        case JCUIGradientTeenNotebook:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x9795f0), JCUIGradientColor(0xfbc8d4)], @[@0.0, @1.0], nil);
        case JCUIGradientPoliteRumors:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xa7a6cb), JCUIGradientColor(0x8989ba), JCUIGradientColor(0x8989ba)], @[@0.0, @0.52, @1.0], nil);
        case JCUIGradientSweetPeriod:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x3f51b1), JCUIGradientColor(0x5a55ae), JCUIGradientColor(0x7b5fac), JCUIGradientColor(0x8f6aae), JCUIGradientColor(0xa86aa4), JCUIGradientColor(0xcc6b8e), JCUIGradientColor(0xf18271), JCUIGradientColor(0xf3a469), JCUIGradientColor(0xf7c978)], @[@0.0, @0.13, @0.25, @0.38, @0.5, @0.62, @0.75, @0.87, @1.0], nil);
        case JCUIGradientWideMatrix:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xfcc5e4), JCUIGradientColor(0xfda34b), JCUIGradientColor(0xff7882), JCUIGradientColor(0xc8699e), JCUIGradientColor(0x7046aa), JCUIGradientColor(0x0c1db8), JCUIGradientColor(0x020f75)], @[@0.0, @0.15, @0.35, @0.52, @0.71, @0.87, @1.0], nil);
        case JCUIGradientSoftCherish:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xdbdcd7), JCUIGradientColor(0xdddcd7), JCUIGradientColor(0xe2c9cc), JCUIGradientColor(0xe7627d), JCUIGradientColor(0xb8235a), JCUIGradientColor(0x801357), JCUIGradientColor(0x3d1635), JCUIGradientColor(0x1c1a27)], @[@0.0, @0.24, @0.30, @0.46, @0.59, @0.71, @0.84, @1.0], nil);
        case JCUIGradientRedSalvation:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xf43b47), JCUIGradientColor(0x453a94)], @[@0.0, @1.0], nil);
        case JCUIGradientBurningSpring:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x4fb576), JCUIGradientColor(0x44c489), JCUIGradientColor(0x28a9ae), JCUIGradientColor(0x28a2b7), JCUIGradientColor(0x4c7788), JCUIGradientColor(0x6c4f63), JCUIGradientColor(0x432c39)], @[@0.0, @0.30, @0.46, @0.59, @0.71, @0.86, @1.0], nil);
        case JCUIGradientNightParty:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x0250c5), JCUIGradientColor(0xd43f8d)], @[@0.0, @1.0], nil);
        case JCUIGradientSkyGlider:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x88d3ce), JCUIGradientColor(0x6e45e2)], @[@0.0, @1.0], nil);
        case JCUIGradientHeavenPeach:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xd9afd9), JCUIGradientColor(0x97d9e1)], @[@0.0, @1.0], nil);
        case JCUIGradientPurpleDivision:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x7028e4), JCUIGradientColor(0xe5b2ca)], @[@0.0, @1.0], nil);
        case JCUIGradientAquaSplash:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 15, @[JCUIGradientColor(0x13547a), JCUIGradientColor(0x80d0c7)], @[@0.0, @1.0], nil);
        case JCUIGradientAboveClouds: {
            CALayer *layer = [CALayer layer];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionLeft, 0, @[JCUIGradientColor(0xBDBBBE), JCUIGradientColor(0x9D9EA3)], @[@0.0, @1.0], nil)];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.88, 0.0), CGPointMake(2.38, 1.5), @[(id)JCUIGradientRGBA16(0xffffff, 0.25).CGColor, (id)JCUIGradientRGBA16(0xfefefe, 0.25).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.25).CGColor], @[@0.0, @0.01, @1.0], [CIFilter filterWithName:@"CILightenBlendMode"])];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 0.0), CGPointMake(1.5, 1.0), @[(id)JCUIGradientRGBA16(0xffffff, 0.3).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.3).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CISoftLightBlendMode"])];
            return layer;
        }
        case JCUIGradientSpikyNaga:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x505285), JCUIGradientColor(0x585e92), JCUIGradientColor(0x65689f), JCUIGradientColor(0x7474b0), JCUIGradientColor(0x7e7ebb), JCUIGradientColor(0x8389c7), JCUIGradientColor(0x9795d4), JCUIGradientColor(0xa2a1dc), JCUIGradientColor(0xb5aee4)], @[@0.0, @0.12, @0.25, @0.37, @0.50, @0.62, @0.75, @0.87, @1.0], nil);
        case JCUIGradientLoveKiss:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xff0844), JCUIGradientColor(0xffb199)], @[@0.0, @1.0], nil);
        case JCUIGradientSharpGlass: {
            CALayer *layer = JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 180, @[(id)JCUIGradientRGBA16(0xffffff, 0.5).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.5).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CILightenBlendMode"]);
            layer.backgroundColor = JCUIGradientRGB16(0xC9CCD3).CGColor;
            return layer;
        }
        case JCUIGradientCleanMirror:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0x93a5cf), JCUIGradientColor(0xe4efe9)], @[@0.0, @1.0], nil);
        case JCUIGradientPremiumDark:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x434343), JCUIGradientColor(0x000000)], @[@0.0, @1.0], nil);
        case JCUIGradientColdEvening:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x0c3483), JCUIGradientColor(0xa2b6df), JCUIGradientColor(0x6b8cce), JCUIGradientColor(0xa2b6df)], @[@0.0, @1.0, @1.0, @1.0], nil);
        case JCUIGradientCochitiLake:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0x93a5cf), JCUIGradientColor(0xe4efe9)], @[@0.0, @1.0], nil);
        case JCUIGradientSummerGames:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x92fe9d), JCUIGradientColor(0x00c9ff)], @[@0.0, @1.0], nil);
        case JCUIGradientPassionateBed:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xff758c), JCUIGradientColor(0xff7eb3)], @[@0.0, @1.0], nil);
        case JCUIGradientMountainRock:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x868f96), JCUIGradientColor(0x596164)], @[@0.0, @1.0], nil);
        case JCUIGradientDesertHump:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xc79081), JCUIGradientColor(0xdfa579)], @[@0.0, @1.0], nil);
        case JCUIGradientJungleDay:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0x8baaaa), JCUIGradientColor(0xae8b9c)], @[@0.0, @1.0], nil);
        case JCUIGradientPhoenixStart:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xf83600), JCUIGradientColor(0xf9d423)], @[@0.0, @1.0], nil);
        case JCUIGradientOctoberSilence:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xb721ff), JCUIGradientColor(0x21d4fd)], @[@0.0, @1.0], nil);
        case JCUIGradientFarawayRiver:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0x6e45e2), JCUIGradientColor(0x88d3ce)], @[@0.0, @1.0], nil);
        case JCUIGradientAlchemistLab:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xd558c8), JCUIGradientColor(0x24d292)], @[@0.0, @1.0], nil);
        case JCUIGradientOverSun:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 60, @[JCUIGradientColor(0xabecd6), JCUIGradientColor(0xfbed96)], @[@0.0, @1.0], nil);
        case JCUIGradientPremiumWhite:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xd5d4d0), JCUIGradientColor(0xd5d4d0), JCUIGradientColor(0xeeeeec), JCUIGradientColor(0xefeeec), JCUIGradientColor(0xe9e9e7)], @[@0.0, @0.01, @0.31, @0.75, @1.0], nil);
        case JCUIGradientMarsParty:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x5f72bd), JCUIGradientColor(0x9b23ea)], @[@0.0, @1.0], nil);
        case JCUIGradientEternalConstance:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x09203f), JCUIGradientColor(0x537895)], @[@0.0, @1.0], nil);
        case JCUIGradientJapanBlush:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xddd6f3), JCUIGradientColor(0xfaaca8), JCUIGradientColor(0xfaaca8)], @[@0.0, @1.0, @1.0], nil);
        case JCUIGradientSmilingRain:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xdcb0ed), JCUIGradientColor(0x99c99c)], @[@0.0, @1.0], nil);
        case JCUIGradientCloudyApple:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xf3e7e9), JCUIGradientColor(0xe3eeff), JCUIGradientColor(0xe3eeff)], @[@0.0, @0.99, @1.0], nil);
        case JCUIGradientBigMango:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xc71d6f), JCUIGradientColor(0xd09693)], @[@0.0, @1.0], nil);
        case JCUIGradientHealthyWater:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 60, @[JCUIGradientColor(0x96deda), JCUIGradientColor(0x50c9c3)], @[@0.0, @1.0], nil);
        case JCUIGradientAmourAmour:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xf77062), JCUIGradientColor(0xfe5196)], @[@0.0, @1.0], nil);
        case JCUIGradientRiskyConcrete:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xc4c5c7), JCUIGradientColor(0xdcdddf), JCUIGradientColor(0xebebeb)], @[@0.0, @0.52, @1.0], nil);
        case JCUIGradientStrongStick:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xa8caba), JCUIGradientColor(0x5d4157)], @[@0.0, @1.0], nil);
        case JCUIGradientViciousStance:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 60, @[JCUIGradientColor(0x29323c), JCUIGradientColor(0x485563)], @[@0.0, @1.0], nil);
        case JCUIGradientPaloAlto:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -60, @[JCUIGradientColor(0x16a085), JCUIGradientColor(0xf4d03f)], @[@0.0, @1.0], nil);
        case JCUIGradientHappyMemories:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -60, @[JCUIGradientColor(0xff5858), JCUIGradientColor(0xf09819)], @[@0.0, @1.0], nil);
        case JCUIGradientMidnightBloom:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0x2b5876), JCUIGradientColor(0x4e4376)], @[@0.0, @1.0], nil);
        case JCUIGradientCrystalline:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0x00cdac), JCUIGradientColor(0x8ddad5)], @[@0.0, @1.0], nil);
        case JCUIGradientRaccoonBack: {
            CALayer *layer = [CALayer layer];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 180, @[JCUIGradientColor(0xBCC5CE), JCUIGradientColor(0x929EAD)], @[@0.0, @1.0], nil)];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.0, 0.0), CGPointMake(1.0, 1.0), @[(id)JCUIGradientRGBA16(0xffffff, 0.3).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.3).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIScreenBlendMode"])];
            return layer;
        }
        case JCUIGradientPartyBliss:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x4481eb), JCUIGradientColor(0x04befe)], @[@0.0, @1.0], nil);
        case JCUIGradientConfidentCloud:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xdad4ec), JCUIGradientColor(0xdad4ec), JCUIGradientColor(0xf3e7e9)], @[@0.0, @0.01, @1.0], nil);
        case JCUIGradientLeCocktail:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0x874da2), JCUIGradientColor(0xc43a30)], @[@0.0, @1.0], nil);
        case JCUIGradientRiverCity:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x4481eb), JCUIGradientColor(0x04befe)], @[@0.0, @1.0], nil);
        case JCUIGradientFrozenBerry:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xe8198b), JCUIGradientColor(0xc7eafd)], @[@0.0 ,@1.0], nil);
        case JCUIGradientElegance: {
            CALayer *layer = [CALayer layer];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.73, 0.73), CGPointMake(1.47, 1.47), @[JCUIGradientColor(0xEADFDF), JCUIGradientColor(0xECE2DF)], @[@0.59, @1.0], nil)];
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.91, 0.91), CGPointMake(2.37, 2.37), @[(id)JCUIGradientRGBA16(0xffffff, 0.1).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.1).CGColor], @[@0.47, @1.0], [CIFilter filterWithName:@"CIScreenBlendMode"])];
            return layer;
        }
        case JCUIGradientChildCare:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xf794a4), JCUIGradientColor(0xfdd6bd)], @[@0.0, @1.0], nil);
        case JCUIGradientFlyingLemon:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 60, @[JCUIGradientColor(0x64b3f4), JCUIGradientColor(0xc2e59c)], @[@0.0, @1.0], nil);
        case JCUIGradientNewRetrowave:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x3b41c5), JCUIGradientColor(0xa981bb), JCUIGradientColor(0xffc8a9)], @[@0.0, @0.49, @1.0], nil);
        case JCUIGradientHiddenJaguar:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x0fd850), JCUIGradientColor(0xf9f047)], @[@0.0, @1.0], nil);
        case JCUIGradientAboveTheSky:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xd3d3d3), JCUIGradientColor(0xd3d3d3), JCUIGradientColor(0xe0e0e0), JCUIGradientColor(0xefefef), JCUIGradientColor(0xd9d9d9), JCUIGradientColor(0xbcbcbc)], @[@0.0, @0.01, @0.26, @0.48, @0.75, @1.0], nil);
        case JCUIGradientNega:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 45, @[JCUIGradientColor(0xee9ca7), JCUIGradientColor(0xffdde1)], @[@0.0, @1.0], nil);
        case JCUIGradientDenseWater:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x3ab5b0), JCUIGradientColor(0x3d99be), JCUIGradientColor(0x56317a)], @[@0.0, @0.31, @1.0], nil);
        case JCUIGradientChemicAqua: {
            CALayer *layer = [CALayer layer];
            layer.backgroundColor = JCUIGradientRGB16(0xCDDCDC).CGColor;
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 1.0), CGPointMake(1.3, 1.8), @[(id)JCUIGradientRGBA16(0xffffff, 0.5).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.5).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIScreenBlendMode"])];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[(id)JCUIGradientRGBA16(0xffffff, 0.25).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.25).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIOverlayBlendMode"])];
            return layer;
        }
        case JCUIGradientSeashore:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x209cff), JCUIGradientColor(0x68e0cf)], @[@0.0, @1.0], nil);
        case JCUIGradientMarbleWall:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xbdc2e8), JCUIGradientColor(0xbdc2e8), JCUIGradientColor(0xe6dee9)], @[@0.0, @0.01, @1.0], nil);
        case JCUIGradientCheerfulCaramel:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xe6b980), JCUIGradientColor(0xeacda3)], @[@0.0, @1.0], nil);
        case JCUIGradientNightSky:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x1e3c72), JCUIGradientColor(0x1e3c72), JCUIGradientColor(0x2a5298)], @[@0.0, @0.01, @1.0], nil);
        case JCUIGradientMagicLake:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xd5dee7), JCUIGradientColor(0xffafbd), JCUIGradientColor(0xc9ffbf)], @[@0.0, @0.0, @1.0], nil);
        case JCUIGradientYoungGrass:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x9be15d), JCUIGradientColor(0x00e3ae)], @[@0.0, @1.0], nil);
        case JCUIGradientColorfulPeach:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xed6ea0), JCUIGradientColor(0xec8c69)], @[@0.0, @1.0], nil);
        case JCUIGradientGentleCare:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xffc3a0), JCUIGradientColor(0xffafbd)], @[@0.0, @1.0], nil);
        case JCUIGradientPlumBath:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xcc208e), JCUIGradientColor(0x6713d2)], @[@0.0, @1.0], nil);
        case JCUIGradientHappyUnicorn:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xb3ffab), JCUIGradientColor(0x12fff7)], @[@0.0, @1.0], nil);
        case JCUIGradientFullMetal: {
            CALayer *layer = [CALayer layer];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[JCUIGradientColor(0xD5DEE7), JCUIGradientColor(0xE8EBF2), JCUIGradientColor(0xE2E7ED)], @[@0.0, @0.5, @1.0], nil)];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[(id)JCUIGradientRGBA16(0x000000, 0.02).CGColor, (id)JCUIGradientRGBA16(0xffffff, 0.02).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.02).CGColor], @[@0.5, @0.61, @0.73], nil)];;
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 33, @[(id)JCUIGradientRGBA16(0xffffff, 0.2).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.2).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIColorBurnBlendMode"])];
            return layer;
        }
        case JCUIGradientAfricanField:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x65bd60), JCUIGradientColor(0x5ac1a8), JCUIGradientColor(0x3ec6ed), JCUIGradientColor(0xb7ddb7), JCUIGradientColor(0xfef381)], @[@0.0, @0.25, @0.50, @0.75, @1.0], nil);
        case JCUIGradientSolidStone:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x243949), JCUIGradientColor(0x517fa4)], @[@0.0, @1.0], nil);
        case JCUIGradientOrangeJuice:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0xfc6076), JCUIGradientColor(0xff9a44)], @[@0.0, @1.0], nil);
        case JCUIGradientGlassWater:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xdfe9f3), JCUIGradientColor(0xffffff)], @[@0.0, @1.0], nil);
        case JCUIGradientSlickCarbon: {
            CALayer *layer = [CALayer layer];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionBottom, 0, @[JCUIGradientColor(0x323232), JCUIGradientColor(0x3F3F3F), JCUIGradientColor(0x1C1C1C)], @[@0.0, @0.4, @1.5], nil)];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[(id)JCUIGradientRGBA16(0xffffff, 0.4).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.25).CGColor], @[@0.0, @1.25], [CIFilter filterWithName:@"CIMultiplyBlendMode"])];
            return layer;
        }
        case JCUIGradientNorthMiracle:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x00dbde), JCUIGradientColor(0xfc00ff)], @[@0.0, @1.0], nil);
        case JCUIGradientFruitBlend:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xf9d423), JCUIGradientColor(0xff4e50)], @[@0.0, @1.0], nil);
        case JCUIGradientMillenniumPine:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x50cc7f), JCUIGradientColor(0xf5d100)], @[@0.0, @1.0], nil);
        case JCUIGradientHighFlight:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0x0acffe), JCUIGradientColor(0x495aff)], @[@0.0, @1.0], nil);
        case JCUIGradientMoleHall:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -20, @[JCUIGradientColor(0x616161), JCUIGradientColor(0x9bc5c3)], @[@0.0, @1.0], nil);
        case JCUIGradientEarlGray: {
            CALayer *layer = [CALayer layer];
            layer.backgroundColor = JCUIGradientRGB16(0xe4e4e1).CGColor;
            [layer addSublayer:JCUIGradientCreateRadialGradientLayer(CGPointMake(0.5, 0.0), CGPointMake(1.5, 1.0), @[(id)JCUIGradientRGBA16(0xffffff, 0.03).CGColor, (id)JCUIGradientRGBA16(0x000000, 0.03).CGColor], @[@0.0, @1.0], nil)];
            [layer addSublayer:JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[(id)JCUIGradientRGBA16(0xffffff, 0.1).CGColor, (id)JCUIGradientRGBA16(0x8F989D, 0.6).CGColor], @[@0.0, @1.0], [CIFilter filterWithName:@"CIMultiplyBlendMode"])];
            return layer;
        }
        case JCUIGradientSpaceShift:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, 60, @[JCUIGradientColor(0x3d3393), JCUIGradientColor(0x2b76b9), JCUIGradientColor(0x2cacd1), JCUIGradientColor(0x35eb93)], @[@0.0, @0.37, @0.65, @1.0], nil);
        case JCUIGradientForestInei:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xdf89b5), JCUIGradientColor(0xbfd9fe)], @[@0.0, @1.0], nil);
        case JCUIGradientRoyalGarden:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xed6ea0), JCUIGradientColor(0xec8c69)], @[@0.0, @1.0], nil);
        case JCUIGradientRichMetal:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xd7d2cc), JCUIGradientColor(0x304352)], @[@0.0, @1.0], nil);
        case JCUIGradientJuicyCake:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xe14fad), JCUIGradientColor(0xf9d423)], @[@0.0, @1.0], nil);
        case JCUIGradientSmartIndigo:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0xb224ef), JCUIGradientColor(0x7579ff)], @[@0.0, @1.0], nil);
        case JCUIGradientSandStrike:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xc1c161), JCUIGradientColor(0xc1c161), JCUIGradientColor(0xd4d4b1)], @[@0.0, @0.0, @1.0], nil);
        case JCUIGradientNorseBeauty:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionRight, 0, @[JCUIGradientColor(0xec77ab), JCUIGradientColor(0x7873f5)], @[@0.0, @1.0], nil);
        case JCUIGradientAquaGuidance:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionTop, 0, @[JCUIGradientColor(0x007adf), JCUIGradientColor(0x00ecbc)], @[@0.0, @1.0], nil);
        case JCUIGradientSunVeggie:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x20E2D7), JCUIGradientColor(0xF9FEA5)], @[@0.0, @1.0], nil);
        case JCUIGradientSeaLord:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x2CD8D5), JCUIGradientColor(0xC5C1FF), JCUIGradientColor(0xFFBAC3)], @[@0.0, @0.56, @1.0], nil);
        case JCUIGradientBlackSea:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x2CD8D5), JCUIGradientColor(0x6B8DD6), JCUIGradientColor(0x8E37D7)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientGrassShampoo:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xDFFFCD), JCUIGradientColor(0x90F9C4), JCUIGradientColor(0x39F3BB)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientLandingAircraft:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x5D9FFF), JCUIGradientColor(0xB8DCFF), JCUIGradientColor(0x6BBBFF)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientWitchDance:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xA8BFFF), JCUIGradientColor(0x884D80)], @[@0.0, @1.0], nil);
        case JCUIGradientSleeplessNight:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x5271C4), JCUIGradientColor(0xB19FFF), JCUIGradientColor(0xECA1FE)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientAngelCare:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xFFE29F), JCUIGradientColor(0xFFA99F), JCUIGradientColor(0xFF719A)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientCrystalRiver:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x22E1FF), JCUIGradientColor(0x1D8FE1), JCUIGradientColor(0x625EB1)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientSoftLipstick:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xB6CEE8), JCUIGradientColor(0xF578DC)], @[@0.0, @1.0], nil);
        case JCUIGradientSaltMountain:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xFFFEFF), JCUIGradientColor(0xD7FFFE)], @[@0.0, @1.0], nil);
        case JCUIGradientPerfectWhite:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xE3FDF5), JCUIGradientColor(0xFFE6FA)], @[@0.0, @1.0], nil);
        case JCUIGradientFreshOasis:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x7DE2FC), JCUIGradientColor(0xB9B6E5)], @[@0.0, @1.0], nil);
        case JCUIGradientStrictNovember:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xCBBACC), JCUIGradientColor(0x2580B3)], @[@0.0, @1.0], nil);
        case JCUIGradientMorningSalad:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xB7F8DB), JCUIGradientColor(0x50A7C2)], @[@0.0, @1.0], nil);
        case JCUIGradientDeepRelief:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x7085B6), JCUIGradientColor(0x87A7D9), JCUIGradientColor(0xDEF3F8)], @[@0.0, @0.50, @1.0], nil);
        case JCUIGradientSeaStrike:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x77FFD2), JCUIGradientColor(0x6297DB), JCUIGradientColor(0x1EECFF)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientNightCall:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xAC32E4), JCUIGradientColor(0x7918F2), JCUIGradientColor(0x4801FF)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientSupremeSky:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xD4FFEC), JCUIGradientColor(0x57F2CC), JCUIGradientColor(0x4596FB)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientLightBlue:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x9EFBD3), JCUIGradientColor(0x57E9F2), JCUIGradientColor(0x45D4FB)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientMindCrawl:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x473B7B), JCUIGradientColor(0x3584A7), JCUIGradientColor(0x30D2BE)], @[@0.0, @0.51, @1.0], nil);
        case JCUIGradientLilyMeadow:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x65379B), JCUIGradientColor(0x886AEA), JCUIGradientColor(0x6457C6)], @[@0.0, @0.53, @1.0], nil);
        case JCUIGradientSugarLollipop:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xA445B2), JCUIGradientColor(0xD41872), JCUIGradientColor(0xFF0066)], @[@0.0, @0.52, @1.0], nil);
        case JCUIGradientSweetDessert:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x7742B2), JCUIGradientColor(0xF180FF), JCUIGradientColor(0xFD8BD9)], @[@0.0, @0.52, @1.0], nil);
        case JCUIGradientMagicRay:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xFF3CAC), JCUIGradientColor(0x562B7C), JCUIGradientColor(0x2B86C5)], @[@0.0, @0.52, @1.0], nil);
        case JCUIGradientTeenParty:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xFF057C), JCUIGradientColor(0x8D0B93), JCUIGradientColor(0x321575)], @[@0.0, @0.50, @1.0], nil);
        case JCUIGradientFrozenHeat:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0xFF057C), JCUIGradientColor(0x7C64D5), JCUIGradientColor(0x4CC3FF)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientGagarinView:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x69EACB), JCUIGradientColor(0xEACCF8), JCUIGradientColor(0x6654F1)], @[@0.0, @0.48, @1.0], nil);
        case JCUIGradientFabledSunset:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x231557), JCUIGradientColor(0x44107A), JCUIGradientColor(0xFF1361), JCUIGradientColor(0xFFF800)], @[@0.0, @0.29, @0.67, @1.0], nil);
        case JCUIGradientPerfectBlue:
            return JCUIGradientCreateLinearGradientLayer(JCUIGradientDirectionDegress, -225, @[JCUIGradientColor(0x3D4E81), JCUIGradientColor(0x5753C9), JCUIGradientColor(0x6E7FF3)], @[@0.0, @0.48, @1.0], nil);
        default: break;
    }
}
